package com.lening.iot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.iot.dao.MonthlycardDAO;
import com.lening.iot.dto.MonthlycardDTO;
import com.lening.iot.po.MonthlycardPO;
import com.lening.iot.service.MonthlycardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:10
 */

@Service
public class MonthlycardServiceImpl extends BaseServiceImpl<MonthlycardDAO, MonthlycardPO, MonthlycardDTO> implements MonthlycardService{
    @Autowired(required = false)
    private MonthlycardDAO monthlycardDAO;
    @Override
    public Page<MonthlycardDTO> getAllMtc(Page<MonthlycardDTO> monthlycardDTOPage) {
        Page<MonthlycardDTO> mtcList = monthlycardDAO.getAllMtc(monthlycardDTOPage);
        return mtcList;
    }

    @Override
    public List<MonthlycardDTO> getAll(String communityname) {
        return monthlycardDAO.getAll(communityname);
    }

    @Override
    public Page<?> page(MonthlycardDTO monthlycardDTO) {
        return monthlycardDAO.getAllMtc(monthlycardDTO);
    }

    @Override
    public MonthlycardPO getById(Long id) {
        return this.monthlycardDAO.getById(id);
    }
}
